<?php
class Account_Model_DbTable_myratings extends Zend_Db_Table_Abstract {
	
	protected $_name = "my_ratings";
	
	public function addRatings($class, $semester, $year, $user_id){
		
		$data = array(
		 'class_name'=> $class,
		 'semester'=> $semester,
		 'year' => $year,
		 'user_id' => $user_id,
		 'time'=>new Zend_Db_Expr("now()")
		);
		$this->insert($data);
	}
	
	

	/**
	 * Function: getUserRatings
	 * @param unknown_type $id
	 */
	public function getUserRatings($id){
		
		return $this->fetchAll('user_id ='. $id);
	}

}